package com.zqq.baselibrary.injection.component

import android.app.Activity
import android.content.Context
import com.trello.rxlifecycle.LifecycleProvider
import com.zqq.baselibrary.injection.ActivityScope
import com.zqq.baselibrary.injection.module.ActivityModule
import com.zqq.baselibrary.injection.module.LifecycleProviderModule
import dagger.Component

/**
 *  Application级别Component
 * @author zqq on 2018/7/26
 */
@ActivityScope
@Component(dependencies = arrayOf(AppComponent::class),
        modules = arrayOf(ActivityModule::class,
                LifecycleProviderModule::class))
interface ActivityComponent {

    fun activity(): Activity

    //没办法找到父类AppCom中的context，扔要显示暴露context方法
    fun context():Context

    //暴露provider方法，才能找到
    fun lifecycleProvider(): LifecycleProvider<*>

}